<!--登录页-->
<template>
  <div style="height:100vh;background-image:linear-gradient(135deg,#999,#eee);overflow:hidden;">
    <el-container style="padding:30px;">
      <el-header>
        <el-row :gutter="10">
          <el-col :span="8"></el-col>
          <el-col :span="12">
            <span style="color:#fff;font-size:60px;font-weight:bold;text-align: center;">连锁水果超市管理系统</span>
          </el-col>
        </el-row>
      </el-header>
      <el-main>
        <el-card style="width: 500px;margin:100px auto 0;">
          <template #header>
            <h3 style="text-align:center;font-size: 30px;margin-bottom: 0;">管理人员登录</h3>
          </template>
          <el-form label-position="top">
            <el-form-item label="用户名">
              <el-input placeholder="请输入用户名" v-model="user.username"></el-input>
            </el-form-item>
            <el-form-item label="密码">
              <el-input placeholder="请输入密码" type="password" v-model="user.password"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" style="width:100%;" @click="login">登录</el-button>
            </el-form-item>
          </el-form>
          <div style="color:#666;text-align:center;font-size:14px;padding:10px 0;">
            (体验账号:tom 密码:123456)
          </div>
        </el-card>
      </el-main>
    </el-container>
  </div>
</template>

<script setup>
import {ref} from "vue";
import router from "@/router";

const user = ref({username:'',password:''});
const login = ()=>{
  console.log(user.value);
  //向后端发登录请求
  router.push('/manager')
}
</script>

<style scoped>
</style>